package group2assignone.ucm.manager;

import group2assignone.model.Flight;
import group2assignone.ucm.UCController;
import group2assignone.view.manager.CreateFlightView;
import group2assignone.view.manager.ManagerView;

/**
 * use case to cancel creating a flight
 * @author group2
 */
public class UCCreateFlightCancel implements UCController {

    private CreateFlightView flightView = new CreateFlightView();
    private Flight f = new Flight();

    /**
     * set view and flight
     * @param fView
     * @param flight
     */
    public UCCreateFlightCancel(CreateFlightView fView, Flight flight) {
        flightView = fView;
        f = flight;
    }

    @Override
    public void run() {

        flightView.dispose();
        ManagerView mv = ManagerView.getInstance();
        mv.setVisible(true);
    //UCManagerLogin ucml = new UCManagerLogin();
    //ucml.run();
    //Close window and open main login screen
    //ManagerView mv = new ManagerView();
    //Manager man = new Manager();
    //UCManagerLogin ucl = new UCManagerLogin(mv, man);
    }
}
